﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace QLNHK
{
    public partial class frmWait : Form
    {
        public frmWait()
        {
            InitializeComponent();
        }
        public void SetCaption(string caption)
        {
            System.Drawing.Image _ResourceWait;
            System.IO.Stream stream;
            System.Reflection.Assembly assembly;
            assembly = System.Reflection.Assembly.LoadFrom(Application.ExecutablePath);
            stream = assembly.GetManifestResourceStream("QLNHK.Images.wait.gif");
            _ResourceWait = System.Drawing.Image.FromStream(stream);

            if (this.InvokeRequired)
            {
                this.Invoke(new MethodInvoker(delegate
                {

                    lblThongBao.Text = caption;
                    pictureBox1.Image = _ResourceWait;
                    Refresh();
                }));

            }
            else
            {

                lblThongBao.Text = caption;
                pictureBox1.Image = _ResourceWait;
                Refresh();
            }
        }
        private void frmWait_Load(object sender, EventArgs e)
        {

        }
    }
}
